package com.base.controller;

import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/admin")
public class AdminHomeController {
	// 用户首页
	@RequestMapping("/adminHome")
	public ModelAndView queryItems(HttpServletRequest request) throws Exception {
		// 返回ModelAndView
		ModelAndView modelAndView = new ModelAndView();
		if (request.getSession().getAttribute("adminUserId") == null) {
			modelAndView.setViewName("jsp/login");
			return modelAndView;
		}

		// 添加日期以及新增次数
		// 添加日期以及活跃次数
		// 总用户量
		// 短信统计
		// 总用户统计
		// 设置页面进行跳转
		modelAndView.setViewName("jsp/admin_home");
		return modelAndView;
	}
}